package com.kevis.webCommon.web.domain.convert;

import com.kevis.zhunblog.core.entities.BaseClassEntity;
import com.kevis.zhunblog.core.vo.TreeSelectVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface BaseClassEntity2TreeSelectVoMapper {
    BaseClassEntity2TreeSelectVoMapper INSTANCE = Mappers.getMapper(BaseClassEntity2TreeSelectVoMapper.class);

    @Mapping(source = "classPath",target = "field")
    TreeSelectVo toConvert(BaseClassEntity baseClassEntity);

    List<TreeSelectVo> toConvertList(List<BaseClassEntity> person);
}
